package com.yeebo.exception;

import com.yeebo.enums.ResultCode;

/**
 * 自定义服务端封装异常类
 */
public class ServiceException extends RuntimeException {
    private static final long serialVersionUID = -1L;

    private Integer code;

    public ServiceException(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.code = resultCode.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
